public class test1 {
    public static boolean func(int[] array){
        for (int i = 0; i < array.length - 1; i++) {
            if (array[i] > array[i+1]) {
                return false;
            }
        }
        return true;
    }
    public static void main(String[] args) {
        int[] array = {1,2,4,3};
        System.out.println(func(array));
    }
}
